<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>common_util: src/common_util/datetime.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">common_util<span id="projectnumber">&#160;1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_2961cad218251a7c35c6867350b80887.html">common_util</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">datetime.h File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>A simple, feature-rich modern C++ date-time class.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cstdint&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;regex&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;utility&gt;</code><br />
</div>
<p><a href="datetime_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcutl_1_1datetime.html">cutl::datetime</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple, feature-rich modern C++ date-time class.  <a href="classcutl_1_1datetime.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a4e11bf4fcf504b16f185690443d143b4" id="r_a4e11bf4fcf504b16f185690443d143b4"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="datetime_8h.html#a4e11bf4fcf504b16f185690443d143b4">cutl::datetime_format</a> { <a class="el" href="datetime_8h.html#a4e11bf4fcf504b16f185690443d143b4afc53fb608f9400b917e42c8c643be5a2">datetime_format_a</a>
, <a class="el" href="datetime_8h.html#a4e11bf4fcf504b16f185690443d143b4acb35d671f58ee198728dd4bb5869d919">datetime_format_b</a>
, <a class="el" href="datetime_8h.html#a4e11bf4fcf504b16f185690443d143b4a4e7170b4333cf5c16894c74cc4779eca">datetime_format_c</a>
, <a class="el" href="datetime_8h.html#a4e11bf4fcf504b16f185690443d143b4a5bbd4410e0cdffa6e4e82e48cef15bd9">datetime_format_d</a>
 }</td></tr>
<tr class="memdesc:a4e11bf4fcf504b16f185690443d143b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The string datetime format for parsing and formatting.  <a href="datetime_8h.html#a4e11bf4fcf504b16f185690443d143b4">More...</a><br /></td></tr>
<tr class="separator:a4e11bf4fcf504b16f185690443d143b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ade576064506faebb5f0ce249d023b4c4" id="r_ade576064506faebb5f0ce249d023b4c4"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="datetime_8h.html#ade576064506faebb5f0ce249d023b4c4">cutl::operator&lt;&lt;</a> (std::ostream &amp;os, const <a class="el" href="classcutl_1_1datetime.html">datetime</a> &amp;dt)</td></tr>
<tr class="memdesc:ade576064506faebb5f0ce249d023b4c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define the output stream operator for datetime object.  <br /></td></tr>
<tr class="separator:ade576064506faebb5f0ce249d023b4c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A simple, feature-rich modern C++ date-time class. </p>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (c) 2024, Spencer.Luo. All Rights Reserved.</dd></dl>
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at </p><pre class="fragment">  http://www.apache.org/licenses/LICENSE-2.0
</pre><p> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations.</p>
<dl class="section author"><dt>Author</dt><dd>spencer.luo </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024-05-13 </dd></dl>
</div><h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a4e11bf4fcf504b16f185690443d143b4" name="a4e11bf4fcf504b16f185690443d143b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e11bf4fcf504b16f185690443d143b4">&#9670;&#160;</a></span>datetime_format</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum class <a class="el" href="datetime_8h.html#a4e11bf4fcf504b16f185690443d143b4">cutl::datetime_format</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The string datetime format for parsing and formatting. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a4e11bf4fcf504b16f185690443d143b4afc53fb608f9400b917e42c8c643be5a2" name="a4e11bf4fcf504b16f185690443d143b4afc53fb608f9400b917e42c8c643be5a2"></a>datetime_format_a&#160;</td><td class="fielddoc"><p>YYYY-MM-DD HH:MM:SS.sss </p>
</td></tr>
<tr><td class="fieldname"><a id="a4e11bf4fcf504b16f185690443d143b4acb35d671f58ee198728dd4bb5869d919" name="a4e11bf4fcf504b16f185690443d143b4acb35d671f58ee198728dd4bb5869d919"></a>datetime_format_b&#160;</td><td class="fielddoc"><p>YYYY.MM.DD HH:MM:SS </p>
</td></tr>
<tr><td class="fieldname"><a id="a4e11bf4fcf504b16f185690443d143b4a4e7170b4333cf5c16894c74cc4779eca" name="a4e11bf4fcf504b16f185690443d143b4a4e7170b4333cf5c16894c74cc4779eca"></a>datetime_format_c&#160;</td><td class="fielddoc"><p>YYYY/MM/DD HH:MM:SS </p>
</td></tr>
<tr><td class="fieldname"><a id="a4e11bf4fcf504b16f185690443d143b4a5bbd4410e0cdffa6e4e82e48cef15bd9" name="a4e11bf4fcf504b16f185690443d143b4a5bbd4410e0cdffa6e4e82e48cef15bd9"></a>datetime_format_d&#160;</td><td class="fielddoc"><p>YYYYMMDD HH:MM:SS </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ade576064506faebb5f0ce249d023b4c4" name="ade576064506faebb5f0ce249d023b4c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade576064506faebb5f0ce249d023b4c4">&#9670;&#160;</a></span>operator&lt;&lt;()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream &amp; cutl::operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>os</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcutl_1_1datetime.html">datetime</a> &amp;&#160;</td>
          <td class="paramname"><em>dt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Define the output stream operator for datetime object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">os</td><td>the std::ostream object </td></tr>
    <tr><td class="paramname">dt</td><td>the datetime object to be output </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::ostream&amp; the reference of the std::ostream object after outputting the datetime object </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
